package com.quasar.hpatient.presenter;

import com.quasar.hpatient.model.custommodel.BloodPressureTableItem;
import com.quasar.hpatient.model.requestmodel.RequestModel;
import com.quasar.hpatient.onInterface.AnotherResultListener;
import com.quasar.hpatient.onInterface.viewInterface.UiInterface;

import java.util.List;

/**
 * author : 许建宏
 * Date: 2017/10/26 0026
 * View:血压
 */

public class BloodPressurePresenter {

    private RequestModel requestModel;
    private UiInterface<List<BloodPressureTableItem>> uiInterface;

    public BloodPressurePresenter(UiInterface<List<BloodPressureTableItem>> uiInterface) {
        this.requestModel = new RequestModel();
        this.uiInterface = uiInterface;
    }

    public void PostRemindMedicine(){

        requestModel.BloodPressureData(new AnotherResultListener<List<BloodPressureTableItem>>() {
            @Override
            public void onSuccess(List<BloodPressureTableItem> data) {
                uiInterface.onViewSuccess(data);
            }

            @Override
            public void onError(String msg) {

            }

            @Override
            public void onRefreshUI() {

            }
        });


    }
}
